package com.common.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;

import com.common.android.ui.widget.LoadingImageView;
import com.common.utils.StarAppUtils;
import com.starappallcommon.R;

/**
 * 注册/登录等待对话框
 * 
 * <br>Created 2014-6-6 下午5:25:10
 * @version  V1.0
 * @author   linsj  		
 *
 * @see
 */
public class StarappWaitDlg extends Dialog {
	private TextView mtvTip;
	private String mstrTip;
	private LoadingImageView mLoadingImageView;
	
	/**
	 * 
	 * Creates a new instance of StarappWaitDlg.
	 * <br>Created 2014-6-9 下午5:42:01
	 * @param context 上下文
	 * @param strTip 提示语
	 * @param Resid 资源id
	 */
	public StarappWaitDlg(Context context, String strTip, int Resid) {
		super(context, Resid);
		mstrTip = strTip;
	}
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		this.setContentView(R.layout.starapp_wait_dlg);
		mLoadingImageView = (LoadingImageView) findViewById(R.id.ldv_tip);
		mtvTip = (TextView)findViewById(R.id.tv_tip);
		StarAppUtils.setViewTypeFace(mtvTip, false);
		mtvTip.setText(mstrTip);
	}	
	
	@Override
	public void show() {
	    super.show();
	    mLoadingImageView.setVisibility(View.VISIBLE);
	}
}
